// 登录获取 token
export function loginApi(data: any) {
  return uni.http({
    url: 'api/mp/auth',
    method: 'POST',
    data,
  })
}
// 更新手机号
export function updatePhone<T>(data: any) {
  return uni.http<T>({
    url: 'api/member/updateMobileByCode',
    method: 'POST',
    data,
  })
}
// 获取个人信息
export function getUserInfo<T>() {
  return uni.http<T>({
    url: 'api/member/myInfo',
    method: 'POST',
  })
}
// 修改头像或昵称
export function updateAvatarNickName<T>(data?: any) {
  return uni.http<T>({
    url: 'api/member/updateInfo',
    method: 'POST',
    data,
  })
}

// 上传身份认证
export function createRenZheng<T>(data?: any) {
  return uni.http<T>({
    url: 'api/certification/create',
    method: 'POST',
    data,
  })
}

// 认证查询
export function getInfoRenZheng<T>() {
  return uni.http<T>({
    url: 'api/certification/getInfo',
    method: 'POST',
  })
}

// 认证修改
export function updateRenZheng<T>(data?: any) {
  return uni.http<T>({
    url: 'api/certification/update',
    method: 'POST',
    data,
  })
}

// 获取积分日志
export function getScore<T>(data?: any) {
  return uni.http<T>({
    url: 'api/member/scoreLog',
    method: 'POST',
    data,
  })
}

// 直播观看记录
export function getLiveHistory<T>(data?: any) {
  return uni.http<T>({
    url: 'api/content/watch',
    data,
  })
}

// 获取面板礼物订单
export function getChongzhiInfo<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/live_gift/panelInfo',
    method: 'POST',
    data,
  })
}

// 获取用户充值余额订单
export function getOrder<T>(data?: any) {
  return uni.http<T>({
    url: 'api/member/recharge',
    method: 'POST',
    data,
  })
}

// 获取咨询专家订单
export function getExpertOrder<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/specialist/createOrder',
    method: 'POST',
    data,
  })
}

// 获取咨询医生订单
export function getDoctorOrder<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/HospitalDoctor/createOrder',
    method: 'POST',
    data,
  })
}

// 获取预约服务订单
export function getFuwuOrder<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/fuwu/buy',
    method: 'POST',
    data,
  })
}

// 收藏服务
export function shoucangFuwu<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/fuwu/collection',
    method: 'POST',
    data,
  })
}

// 微信支付
export function Pay<T>(data?: any) {
  return uni.http<T>({
    url: 'api/wechat_pay/index',
    data,
  })
}

// 余额支付
export function yuePay<T>(data?: any) {
  return uni.http<T>({
    url: 'api/pay/index',
    data,
  })
}

// 直播间礼物订单
export function getliveGiftOrder<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/live_gift/buyPanel',
    method: 'POST',
    data,
  })
}

// 咪婴币充值记录
export function getUserCoinLog<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/user_coin_log/pageList',
    data,
  })
}

// 直播间送礼记录
export function getGiftLogsLog<T>(data?: any) {
  return uni.http<T>({
    url: 'api/content/send',
    data,
  })
}

// 直播间收礼记录
export function getReceiveGiftLog<T>(data?: any) {
  return uni.http<T>({
    url: 'api/content/receive',
    data,
  })
}

// 我的关注列表
export function getFollowList<T>(data?: any) {
  return uni.http<T>({
    url: 'index.php/sq/Follow/pageList',
    data,
  })
}

// 获取订单
export function getOrderList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/order/pageList',
    data,
  })
}

// 获取订单
export function getOrderDetail<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/order/getInfo',
    method: 'POST',
    data,
  })
}

// 我的挂号
export function getAppiontmentList<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/appiontment/pageList',
    data,
  })
}

// 我的获赞列表
export function getZanList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/post/my_zanlist',
    data,
  })
}

// 挂号详细
export function getAppointmentInfo<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/appiontment/getInfo',
    data,
  })
}

export function getAppointmentInfoNew<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/appiontment/getInfo_new',
    data,
  })
}

// 挂号订单
export function getAppointmentOrder<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/appiontment/pay',
    data,
  })
}

// 取消订单
export function cancelOrder<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/order/cancel',
    method: 'POST',
    data,
  })
}

// 服务核销
export function getHexiao<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/fuwu/buylog',
    data,
  })
}

// 我的留言
export function getMessageList<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/hospital/activity_message',
    data,
  })
}

// 获取用户动态信息列表
export function getDongtaiList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/post/pageList',
    data,
  })
}

// 删除用户回复评论
export function delDongtaiReply<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/post_comment/deleteReply',
    data,
  })
}

// 动态设置公开或私密
export function setDongtaiPermission<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/post/permission',
    method: 'POST',
    data,
  })
}

// 删除动态
export function delDongtai<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/post/delete',
    method: 'POST',
    data,
  })
}

// 获取邀请列表
export function getInviteList<T>(data?: any) {
  return uni.http<T>({
    url: 'api/member/getInviteList',
    method: 'POST',
    data,
  })
}

// 获取邀请二维码
export function getInviteCode<T>(data?: any) {
  return uni.http<T>({
    url: 'api/member/getInviteQrCode',
    method: 'POST',
    data,
  })
}

// 我的收藏
export function getCollectList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/post/collectList',
    data,
  })
}

// 取消收藏
export function cancelCollect<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/post/collect',
    method: 'POST',
    data,
  })
}

// 获取用户宝宝档案
export function getBaobaoList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/user_event/pageList',
    data,
  })
}

// 新增宝宝档案
export function addBaobao<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/user_event/create',
    method: 'POST',
    data,
  })
}

// 获取宝宝档案
export function getBaobao<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/user_event/getInfo',
    data,
  })
}

// 编辑宝宝档案
export function editBaobao<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/user_event/update',
    method: 'POST',
    data,
  })
}

// 删除宝宝档案
export function delBaobao<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/user_event/delete',
    method: 'POST',
    data,
  })
}

// 获取余额记录
export function getMoneyLog<T>(data?: any) {
  return uni.http<T>({
    url: 'api/member/moneyLog',
    method: 'POST',
    data,
  })
}

// 用户获取提现记录
export function getPayoutLog<T>(data?: any) {
  return uni.http<T>({
    url: 'api/member/payoutLog',
    method: 'POST',
    data,
  })
}

// 主播获取提现记录
export function getPayoutLogLiver<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/live_payout/pageList',
    data,
  })
}

// 获取进房订单
export function getRoomOrderList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/live_room/orderList',
    data,
  })
}

// 用户发起提现
export function userTixian<T>(data?: any) {
  return uni.http<T>({
    url: 'api/member/payout',
    method: 'POST',
    requestType: 'bl',
    data,
  })
}

// 主播发起提现
export function liverTixian<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/live_payout/create',
    method: 'POST',
    data,
  })
}

// 读取消息列表
export function getChatMsgList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/chat/message',
    data,
    header: {
      platform: 'sq',
    },
  })
}

// 发送消息
export function sendChatMsg<T>(data?: any) {
  return uni.http<T>({
    url: 'api/chat/sendMessage',
    method: 'POST',
    data,
    header: {
      platform: 'sq',
    },
  })
}

// 获取动态回复列表
export function getReplyList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/post_comment/replyList',
    data,
  })
}

// 获取我的回话列表
export function getMyChatList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/chat/dialog',
    data,
  })
}

// 获取反馈类型
export function getFeedbackList<T>(data?: any) {
  return uni.http<T>({
    url: 'api/common/feedback',
    data,
    header: {
      platform: 'px',
    },
  })
}

// 添加反馈
export function addFeedback<T>(data?: any) {
  return uni.http<T>({
    url: 'api/common/feedback',
    method: 'POST',
    data,
    header: {
      platform: 'px',
    },
  })
}

// 自动回复策略列表
export function getStrategyList<T>(data?: any) {
  return uni.http<T>({
    url: 'api/chat/strategy',
    data,
  })
}

// 编辑自动回复策略
export function editStrategy<T>(data?: any) {
  return uni.http<T>({
    url: 'api/chat/strategy',
    method: 'POST',
    data,
  })
}

// 删除自动回复策略
export function delStrategy<T>(data?: any) {
  return uni.http<T>({
    url: 'api/chat/delete_strategy',
    data,
  })
}

// 扫码绑定
export function getCode<T>(data?: any) {
  return uni.http<T>({
    url: 'api/scan/code',
    data,
  })
}

// 确定绑定
export function confirmBind<T>(data?: any) {
  return uni.http<T>({
    url: 'api/scan/comfireBindAdmin',
    data,
  })
}
// 确定绑定
export function getHexiaoCode<T>(data?: any) {
  return uni.http<T>({
    url: 'ch/fuwu/getCode',
    data,
  })
}

export function loginbyPhoneCode(data: any) {
  return uni.http({
    url: 'api/mp/phone_auth',
    method: 'POST',
    data,
  })
}

export function searchResult(data: any) {
  return uni.http({
    url: 'api/content/search',
    method: 'GET',
    // 获取腾讯 IM SDK
  })
}
export function getIMSDK<T>(data?: any) {
  return uni.http<T>({
    url: 'api/Im/get_sig',
    data,
  })
}

// 获取相册列表
export function getChronicList<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/ChronicScience/list',
    data,
    requestType: 'bl',
  })
}


// 获取相册列表
export function getChronicDetail<T>(data?: any) {
  return uni.http<T>({
    url: 'sq/ChronicScience/get_info',
    data,
    requestType: 'bl',
  })
}
